/* "codecmux.h" */

/*********************/
/* CODEC-MULTIPLEXER */
/* for Secure Phone  */
/* (C) 2002 by NAH6  */
/*********************/

#ifndef __CODECMUX_H
#define __CODECMUX_H
#ifdef __cplusplus
extern "C" {
#endif

/*-----------*/
/*  DEFINES  */
/*-----------*/

#define E_CODECMUX_CODEC          (-0x4101)
#define E_CODECMUX_REVISION       (-0x4102)

/*====*/

#define K_CODECMUX_CODECS         (8)
#define K_CODECMUX_MAXREV         (1)
#define K_CODECMUX_CODEC_PCM16    (0)
#define K_CODECMUX_CODEC_PCM8     (1)
#define K_CODECMUX_CODEC_ADPCM4   (2)
#define K_CODECMUX_CODEC_GSMF     (3)
#define K_CODECMUX_CODEC_GSMH     (4)
#define K_CODECMUX_CODEC_GSME     (5)
#define K_CODECMUX_CODEC_CELP     (6)
#define K_CODECMUX_CODEC_G721     (7)

#define K_CODECMUX_MAXEXLEN      (1024)
#define K_CODECMUX_MAXCOLEN       (512)
#define K_CODECMUX_MAXSTATE      (2048)

/*--------------*/
/*  KONSTANTEN  */
/*--------------*/

extern const unsigned char codecmux_maxrev[K_CODECMUX_CODECS];
extern const unsigned short \
       codecmux_exblksize[K_CODECMUX_CODECS][K_CODECMUX_MAXREV];
extern const unsigned short \
       codecmux_coblksize[K_CODECMUX_CODECS][K_CODECMUX_MAXREV];

/*--------------*/
/*  PROTOTYPES  */
/*--------------*/

signed short codecmux_open   (unsigned char codec,    \
                              unsigned char revision, \
                              void *state);
signed short codecmux_close  (unsigned char codec,    \
                              unsigned char revision, \
                              const void *state);
signed short codecmux_encode (unsigned char codec,         \
                              unsigned char revision,      \
                              void *state,                 \
                              const signed short *samples, \
                              unsigned char *encoded);
signed short codecmux_decode (unsigned char codec,          \
                              unsigned char revision,       \
                              void *state,                  \
                              const unsigned char *encoded, \
                              signed short *samples);

#ifdef __cplusplus
}
#endif
#endif


/*** EOF ***/
